	// Depression and distress

		foreach p in b {
			foreach x in baddo badhear badsad badtired badeat badimportant badtalk badspoiled badfrust badspirit baddry badsat badburn {
				gen `x'_resc_`p' = `x'_`p'*-1 + 4
					local lab: var lab `x'_`p'
					la var `x'_resc_`p' "Rescaled: `lab'"
			}

			// Creating Depression index, ADD NEG
			egen depression_`p' = rowtotal(baddo_resc_`p' badhear_resc_`p' badsad_resc_`p' badtired_resc_`p' badeat_resc_`p' badimportant_resc_`p'), missing
				lab var depression_`p' "Depression index"

			// Creating Local Distress index, ADD NEG
			egen distress_`p' = rowtotal(badtalk_resc_`p' badspoiled_resc_`p' badfrust_resc_`p' badspirit_resc_`p' baddry_resc_`p' badsat_resc_`p' badburn_resc_`p'), missing
				lab var distress_`p' "Local Distress index"
		}

		foreach p in e {
			foreach x in baddo badhear badsad badtired badeat badimportant badtalk badspoiled badfrust badspirit baddry badsat badburn {
				gen `x'_resc_`p' = `x'_`p'*-1 + 4
					local lab: var lab `x'_`p'
					la var `x'_resc_`p' "Rescaled: `lab'"
			}

			// Creating Depression index, ADD NEG
			egen depression_`p' = rowtotal(baddo_resc_`p' badhear_resc_`p' badsad_resc_`p' badtired_resc_`p' badeat_resc_`p' badimportant_resc_`p'), missing
				lab var depression_`p' "Depression index"
		}

		// PTSD

		foreach x in thinkbad baddream badagain badbody  badaway {
					gen `x'_resc_e = `x'_e * (-1) + 4
					local lab: var lab `x'_e
					la var `x'_resc_e "`lab' (0-3) ADD MORE PTSD"
				}

		egen distress_e=rowtotal(thinkbad_resc_e baddream_resc_e badagain_resc_e badbody_resc_e  badaway_resc_e badtalk_resc_e badspoiled_resc_e badfrust_resc_e badspirit_resc_e baddry_resc_e badsat_resc_e badburn_resc_e), m
			qui sum distress_e
			qui replace distress_e = (distress_e-r(mean))/r(sd)
			la var distress_e "Distress/PTSD index, Z"



		// Create mental health index
		foreach x in depression_b distress_b {
			qui sum `x' if round == 1
			qui gen stdtemp_`x' = (`x' - r(mean))/r(sd)
		}
		egen mentalhealth_z_b = rowtotal(stdtemp_*), m
		qui sum mentalhealth_z_b if round == 1
		qui replace mentalhealth_z_b = (mentalhealth_z_b-r(mean))/r(sd)
		la var mentalhealth_z_b "Standardized index of depression and distress"
		drop stdtemp_*

		// SUBJECTIVE WELL-BEING LADDER

		gen ladder1yr_change_e = laddernow_e - ladder1yrago_e
		la var ladder1yr_change_e "Change in subj. well-being from 1 year ago to now (-10 to 10)"

		gen ladder5yr_change_e = ladder5yr_e - laddernow_e
		la var ladder5yr_change_e "Change (expected) in subj. well-being from now to 5 yrs from now (-10 to 10)"


		egen subwellbeing_e = rowtotal(happiness_e satisfaction_e health_e),m
		la var subwellbeing_e "Subjective Well-Being Index (0-30) ADD MORE WELL-BEING"

		* RELATIVE WELL-BEING
		egen relwellbeing_e = rowtotal(ladderrich_e ladderresp_e ladderpower_e ladderaccess_e), m
		la var relwellbeing_e "Relative Well-Being Index (0-40) ADD MORE WELL-BEING"

		egen relwellbeing1yr_e = rowtotal(ladderrich1yr_e ladderresp1yr_e ladderpower1yr_e ladderaccess1yr_e), m
		la var relwellbeing1yr_e "Future Relative Well-Being Index (0-40) ADD MORE WELL-BEING"
